#pragma once

#include "Event.h"

namespace Origin
{
    class ORIGIN_API WindowEvent : public Event
    {
    public:
        EVENT_CLASS_CATEGORY(WindowEventCategory)
    };

    class ORIGIN_API WindowResizeEvent : public WindowEvent
    {
    public:
        WindowResizeEvent(unsigned int width, unsigned int height) : _width(width), _height(height) { }

        inline unsigned int GetWidth() const { return _width; }
        inline unsigned int GetHeight() const { return _height; }

        std::string ToString() const override
        {
            std::stringstream ss;
            ss << "WindowResizeEvent:" << _width << ", " << _height;
            return ss.str();
        }

        EVENT_CLASS_TYPE(WindowResize)

    private:
        unsigned int _width, _height;
    };

    class ORIGIN_API WindowCloseEvent : public WindowEvent
    {
    public:
        WindowCloseEvent() { }
        virtual std::string ToString() const override
        {
            std::stringstream ss;
            ss << "WindowCloseEvent";
            return ss.str();
        }
        EVENT_CLASS_TYPE(WindowClose)
    };

    class ORIGIN_API WindowFocusEvent : public WindowEvent
    {
    public:
        WindowFocusEvent() { }

        EVENT_CLASS_TYPE(WindowFocus)

            virtual std::string ToString() const override
        {
            std::stringstream ss;
            ss << "WindowFocusEvent";
            return ss.str();
        }

    };

    class ORIGIN_API WindowLostFocusEvent : public WindowEvent
    {
    public:
        WindowLostFocusEvent() { }

        EVENT_CLASS_TYPE(WindowLostFocus)

            virtual std::string ToString() const override
        {
            std::stringstream ss;
            ss << "WindowLostFocusEvent";
            return ss.str();
        }
    };

    class ORIGIN_API WindowMovedEvent : public WindowEvent
    {
    public:
        WindowMovedEvent() { }

        virtual std::string ToString() const override
        {
            std::stringstream ss;
            ss << "WindowMovedEvent";
            return ss.str();
        }

        EVENT_CLASS_TYPE(WindowClose)
    };
}